package com.eet.ssl.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试控制器
 *
 * @author zheng.zhang
 */
@Api(tags = "SSL测试接口")
@RestController
@RequestMapping("demo")
public class TestController {

    /**
     * 测试接口
     *
     * @param params 参数
     * @return 接口数据
     */
    @ApiOperation(value = "索引接口", nickname = "不知道写啥")
    @GetMapping("test")
    public ResponseEntity<String> index(String params) {
        if (params == null) {
            params = "Empty String";
        }
        return ResponseEntity.ok("测试接口: ".concat(params));
    }
}
